package com.example.springbootvuetest.entity;

import cn.hutool.core.annotation.Alias;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

import java.util.Date;

@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName("sh_user")
public class User {
    @Alias("用户ID")
    @ApiModelProperty("用户ID")
    @TableId(type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty("账户号码")
    @Alias("账户号码")
    private String accountNumber;

    @JsonIgnore
    @Alias("用户密码")
    private String userPassword;

    @ApiModelProperty("用户头像路径")
    @Alias("用户头像路径")
    private String avatar;

    @ApiModelProperty("用户状态")
    @Alias("用户状态")
    private Integer userStatus;

    @ApiModelProperty("昵称")
    @Alias("昵称")
    private String nickname;

    @Alias("注册时间")
    @ApiModelProperty("注册时间")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date signInTime;
}
